package ar.com.framenet.base.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;

@SuppressWarnings({ "rawtypes", "unchecked", "hiding"})
public class GenericJDBCDAO<T> extends BaseDAO	{

	JdbcTemplate jdbcTemplate;

	public class GenericRowMapper<T> implements RowMapper<T> {
		@Override
		public T mapRow(ResultSet arg0, int arg1) throws SQLException {
			/* Student student = new Student(); student.setID(rs.getInt("id"));
			 * student.setName(rs.getString("name"));
			 * student.setAge(rs.getInt("age")); */
			return null;
		}
	}
	
	public void create() {
		jdbcTemplate.update("");
	}

	public List<T> select() {
		String SQL = null;
		List list = jdbcTemplate.query(SQL, new Object[] { 10 }, new GenericRowMapper<T>());
		return list;
	}

	public List<T> selectAll() {
		return null;
	}

	public void deleteAll() {
	}

	public void delete() {
	}
}
